﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Master/AdminDialog.Master"
    AutoEventWireup="true" CodeBehind="ExecuteSql.aspx.cs" Inherits="Besture.UI.Admin.LabelManage.ExecuteSql" %>

<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.2" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager runat="server">
        
    </asp:ScriptManager>
    <asp:UpdatePanel runat="server" ID="up1">
        <ContentTemplate>
            <table width="98%" cellspacing="0" cellpadding="0" class="table_form">
                <tr>
                    <th style="width: 15%">
                        SQL语句：
                    </th>
                    <td style="width: 85%">
                        <cms:TextBox runat="server" ID="txtSql" Required="False" TextMode="MultiLine" Width="500px"
                            Height="100px"></cms:TextBox>
                        <br />
                        &nbsp;&nbsp;<asp:Button runat="server" ID="btnSearch" CssClass="button" OnClick="Btn_Click" Text="查询" /> 
                        <asp:Label runat="server" ID="lblError" ForeColor="Red"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <th style="width: 15%">
                        数据
                    </th>
                    <td style="width: 85%">
                        <cms:ASPxGridView ID="grid" ClientInstanceName="grid" runat="server" Width="99%"
                            AutoGenerateColumns="False" KeyFieldName="ID">
                        </cms:ASPxGridView>
                    </td>
                </tr>
            </table>
            <script language="javascript" type="text/javascript">
                var api = frameElement.api, W = api.opener;
                window.onload = function () {
                    $("#<%=txtSql.ClientID %>").val(W.document.getElementById('<%=_ID %>').value);
                };
            </script>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
